drop if condition==.

* 1: control
* 2: treatment
* 3: direction
* 4: accuracy


* demographic vars

gen sex = q1-1
gen age = q2

gen edu = q3
recode edu 1=0 2=0 3=0.5 4=1

* drop non-Japanese
drop if q4==2


* Party ID
gen supldp = (q9==1)
gen supdpj = (q9==2)
gen supnon = (q9==8)
gen supishin = (q9==5)
gen supjcp = (q9==4)


* feeling thermometer (country)

gen ft_kr = q11_2/100


* feeling thermometer (people)

gen ftp_kr = q12_2/100
gen ftp_Z  = q12_6/100


****************************** Treatment ******************************

* condition
* 1: control
* 2: treatment
* 3: treatment + directional motivation
* 4: treatment + accuracy motivation


****************************** DVs ******************************

gen postZ = q16


* recode control condition
replace postZ = q20 if condition==1

for var post*: recode X 1=1 2=0

* feeling thermometer (people)

gen ftp_kr2 = q26_2/100
gen ftp_Z2  = q26_6/100


* search engine

gen yahoo = (q29==1)
gen google = (q29==2)

gen engine = (q29!=.)
replace engine = 2 if yahoo==1
replace engine = 3 if google==1
recode engine 0=.


****************************** Table 2  ******************************

* Model 1
reg postZ i.condition

* Model 2
reg postZ i.condition sex age edu supldp-supjcp

* Model 3
reg postZ i.condition##c.ft_kr

* Model 4
reg postZ i.condition##c.ft_kr sex age edu supldp-supjcp

* Model 5
reg ftp_kr2 i.condition

* Model 6
reg ftp_kr2 i.condition sex age edu supldp-supjcp

* Model 7
reg ftp_Z2 i.condition

* Model 8
reg ftp_Z2 i.condition sex age edu supldp-supjcp





************************ Content Analysis ******************************

gen ft_kr3=.
replace ft_kr3=-1 if ft_kr<0.5
replace ft_kr3=0 if ft_kr==0.5
replace ft_kr3=1 if ft_kr>0.5

xtile ft_kr3nq = ft_kr, nq(3)

gen ftp_kr3=.
replace ftp_kr3=-1 if ftp_kr<0.5
replace ftp_kr3=0 if ftp_kr==0.5
replace ftp_kr3=1 if ftp_kr>0.5


* recoding urlcoding_q1, irrelevant is recoded to missing
* 1: negative
* 2: positive
* 3: neutral

gen urlcoding_q1_3 = urlcoding_q1
recode urlcoding_q1_3 0=.


* recoding urlcoding_q2
* 1: negative
* 2: positive
* 3: neutral

gen urlcoding_q2_3 = urlcoding_q2
recode urlcoding_q2_3 3=0

